#ifndef EZQAUDIOPLAYERBUFFER_H
#define EZQAUDIOPLAYERBUFFER_H

#include <QIODevice>
#include <QMutex>
#include "decode/libavdecode.h"

class EZQAudioPlayerBuffer : public QIODevice
{

private:
    QMutex _mutex;
    QByteArray _bytes;
    qint64 _readOil;
    qint64 _writeOil;
public:

    LibavDecode *_decode;
    EZQAudioPlayerBuffer();

    virtual qint64 readData(char *data, qint64 maxlen);
    virtual qint64 writeData(const char *data, qint64 len);
};

#endif // EZQAUDIOPLAYERBUFFER_H
